﻿@model Pass
@inject AlpineSkiHouse.Data.PassTypeContext _passTypeContext

<h2>Create Pass</h2>

<form asp-controller="Pass" asp-action="Create" method="post" class="form-horizontal" enctype="multipart/form-data">

    <div asp-validation-summary="ModelOnly" class="text-danger"></div>

    <p class="text-info">
        Add a pass to your card
    </p>
    <div class="form-group">
        <label asp-for="PassTypeId"></label>
        <input asp-for="CardId" type="hidden" />
        <select asp-for="PassTypeId" asp-items="_passTypeContext.PassTypes.Select(x=> new SelectListItem { Text = x.Name, Value = x.Id.ToString() })" class="form-control"></select>
        <span asp-validation-for="PassTypeId" class="text-danger"></span>

    </div>

    <div class="form-group">
        <div class="col-md-offset-2">
            <button type="submit" class="btn btn-default">Create Pass</button>
        </div>
    </div>
</form>


@section Scripts {
    @{ await Html.RenderPartialAsync("_ValidationScriptsPartial"); }
}